package kr.hkit.powerjava.chapter05.work;

import java.util.Scanner;

public class Programming02 {
	public static void main(String[] args){
		int x;
		int y;
		
		Scanner input = new Scanner(System.in);
		System.out.print("정수를 입력하세요 : ");
		x = input.nextInt();
		System.out.print("정수를 입력하세요 : ");
		y = input.nextInt();
		
		System.out.println((x>y)?
		x+" 을"+y+"으로 나눈 몫은"+ x/y+"이고 나머지는"+x%y:  // 참일때
		y+" 을"+x+"으로 나눈 몫은"+y/x+"이고 나머지는"+ y%x);// 거짓일때
	}
}
